
SET( LUA_CPP_STD_H         ./config.h
                           ./luaCPPSTD.h
                           ./luaStringList.h
						   ./luaVector.h
						   ./luaComplex.h)
SET( LUA_CPP_STD_UI_SRC    ./LUA/toluaVector.cpp
                           ./LUA/toluaVectorInt.cpp
                           ./LUA/toluaComplex.cpp
                           ./LUA/toluaStringList.cpp)
SET( LUA_CPP_STD_SRC       ./src/luaCPPSTD.cpp
                           ./src/luaVector.cpp
                           ./src/luaVectorInt.cpp
                           ./src/luaComplex.cpp
                           )

INCLUDE_DIRECTORIES(  ${LUAEx_SOURCE_DIR} )
##INCLUDE_DIRECTORIES(  ${TOLUA++_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${LUA_INCLUDE_DIR} )
INCLUDE_DIRECTORIES(  ${Boost_INCLUDE_DIR} )
message( STATUS "PARSERS boost:${Boost_INCLUDE_DIR}")

SOURCE_GROUP(LUA FILES ${LUA_CPP_STD_H} ${LUA_CPP_STD_UI_SRC})
SOURCE_GROUP(EXC FILES ${LUA_CPP_STD_SRC})

set(LUA_CPP_STD_ALLFILES ${LUA_CPP_STD_H} ${LUA_CPP_STD_UI_SRC} ${LUA_CPP_STD_SRC})

if(LUA_STD_CPP_STATIC_LIB)
	ADD_LIBRARY(luaCPPSTD STATIC ${LUA_CPP_STD_ALLFILES})
else()
	ADD_LIBRARY(luaCPPSTD SHARED ${LUA_CPP_STD_ALLFILES})
    if(WIN32)
        add_definitions( -DLUA_CPP_STD_DLL )
    endif(WIN32)
endif()


add_definitions(-DUNICODE -D_UNICODE)

if(WIN32 OR APPLE)
    target_link_libraries(luaCPPSTD ${TOLUA++_LIBRARY} )
    target_link_libraries(luaCPPSTD ${LUA_LIBRARY} )
endif()

SET_TARGET_PROPERTIES(luaCPPSTD PROPERTIES PREFIX "")
collect_library(luaCPPSTD)
